import axios from '../libs/api.request';

export const login = ({ userName, password }) => {
    const data = {
        userName,
        password
    }
    return axios.request({
        url: 'login',
        data,
        method: 'post'
    });
};


export const getUserInfo = (token) => {
    return axios.request({
        url: 'getInfo',
        params: {
            token
        },
        method: 'post'
    });
};


export const logout = (token) => {
    return axios.request({
        url: 'logout',
        params: {
            token
        },
        method: 'post'
    });
}